﻿#ifndef WIDGET_H
#define WIDGET_H

#include <QRect>
#include <QList>
#include <QWidget>
#include <QAction>
#include <QMenuBar>
#include <QToolBar>
#include <QMdiArea>
#include <QStatusBar>
#include <QDockWidget>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QMainWindow>
#include <QActionGroup>
#include <QKeySequence>
#include <QApplication>

#include "feature.h"
#include "gui/maintitle.h"
#include "gui/projectwindow.h"
#include "gui/newprojectsettings.h"
#include "gui/addremovefileswidget.h"

class qmainWidget : public QMainWindow
{
    Q_OBJECT
public:     /*function*/
    explicit qmainWidget(QWidget *parent = 0);
    ~qmainWidget();

protected:  /*function*/
    void closeEvent(QCloseEvent *event);

private:    /*function*/
    void createAllQAction(void);
    void createMainMenu(void);
    void createMainToolBar(void);
    void createDockWidget(void);
signals:

private slots:
    /*工具栏按钮*/
    void slot_qactionNew();
    void slot_qactionOpen();
    void slot_qactionSave();
    void slot_qactionSaveAs();
    void slot_qactionSaveAll();
    void slot_qactionPrint();
    void slot_qactionCut();
    void slot_qactionCopy();
    void slot_qactionPaste();
    void slot_qactionUndo();
    void slot_qactionRedo();
    void slot_qactionSearch();
    void slot_qactionSearchBackward();
    void slot_qactionSearchForward();
    void slot_qactionSearchFiles();
    void slot_qactionReplace();
    void slot_qactionGotoPrevLink();
    void slot_qactionGotoNextLink();
    void slot_qactionGoBack();
    void slot_qactionGoForward();
    void slot_qactionGotoLine();
    void slot_qactionBookmark();
    void slot_qactionJumpToDefinition();
    void slot_qactionSymbolInfo();
    void slot_qactionBrowseProjectSymbol();
    void slot_qactionLookUpReference();
    void slot_qactionTileHorizontal();
    void slot_qactionTileOneWindow();
    void slot_qactionTileTwoWindow();
    void slot_qactionCascadeWindows();
    void slot_qactionHtmlHelp();
    void slot_qactionProjectWindow();
    void slot_qactionSymbolWindow();
    void slot_qactionContextWindow();
    void slot_qactionRelationWindow();
    void slot_qactionClipWindow();
    void slot_qactionActivateSearchResultWindow();
    /*File菜单*/
    void slot_qactionNewChip();
    void slot_qactionClose();
    void slot_qactionCloseAll();
    void slot_qactionReloadFile();
    void slot_qactionReloadAll();
    void slot_qactionRename();
    void slot_qactionDeleteFile();
    void slot_qactionLoadWorkspace();
    void slot_qactionSaveWorkspace();
    void slot_qactionPageSetup();
    void slot_qactionExit();
    /*Edit菜单*/
    void slot_qactionUndoAll();
    void slot_qactionRedoAll();
    void slot_qactionDuplicate();
    void slot_qactionCutToClip();
    void slot_qactionCopyToClip();
    void slot_qactionPasteFromClip();
    void slot_qactionInsertFile();
    void slot_qactionRenumber();
    void slot_qactionSmartRename();
    void slot_qactionSelectAll();
    void slot_qactionSelectFunctionOrSymbol();
    void slot_qactionSelectBlock();
    //void slot_qactionSpecialEdit();
    void slot_qactionUppercase();
    void slot_qactionLowercase();
    void slot_qactionToggleCase();
    void slot_qactionSpaceToTab();
    void slot_qactionTabToSpace();
    void slot_qactionInsertASCII();
    void slot_qactionReformParagraph();
    void slot_qactionCalculate();
    void slot_qactionIndentRight();
    void slot_qactionIndentLeft();
    void slot_qactionStartRecording();
    void slot_qactionStopRecording();
    void slot_qactionPlayRecording();
    /*Search菜单*/
    void slot_qactionSearchProject();
    void slot_qactionReplaceFiles();
    void slot_qactionSelectionHistory();
    void slot_qactionJumpToLink();
    void slot_qactionParseSourceLinks();
    void slot_qactionBrowseLocalFileSystem();
    /*Project菜单*/
    void slot_qactionNewProject();
    void slot_qactionOpenProject();
    void slot_qactionCloseProject();
    void slot_qactionRemoveProject();
    void slot_qactionAddAndRemoveProjectFiles();
    void slot_qactionSynchronizeFiles();
    void slot_qactionProjectReport();
    void slot_qactionRebuildProject();
    void slot_qactionProjectSettings();
    /*Options*/
    void slot_qactionPreferences();
    void slot_qactionDocumentOptions();
    void slot_qactionStyleProperties();
    void slot_qactionKeyAssignments();
    void slot_qactionMenuAssignments();
    void slot_qactionCustormCommands();
    void slot_qactionLoadConfiguration();
    void slot_qactionSaveConfiguration();
    /*View*/
    //void slot_qactionToolbars();
    void slot_qactionStatusBar();
    void slot_qactionHorizontalScrollBar();
    void slot_qactionLineNumber();
    void slot_qactionShowClipboard();
    void slot_qactionDraftView();
    /*Window*/
    void slot_qactionNewWindow();
    void slot_qactionCloseWindow();
    void slot_qactionTileVertical();
    void slot_qactionLinkWindow();
    void slot_qactionLinkAllWindow();
    void slot_qactionWindowList();
    /*help*/
    void slot_qactionHelp();
    void slot_qactionHelpMode();
    void slot_qactionSDKhelp();
    void slot_qactionCreateKeyList();
    void slot_qactionCreateCommandList();
    void slot_qactionOrderingInformation();
    void slot_qactionSerialNumber();
    void slot_qactionSourceDynamicsOnTheWeb();
    void slot_qactionAbout();
public slots:

public:

protected:

private:
    QMenuBar   *pmenubar;
    QStatusBar *pstatusbar;
    QMdiArea   *pmdiarea;
private:
    QList<QAction*> *qactionlist;
    /*DockWidget*/
    QDockWidget *qdockHtmlHelp;
    QDockWidget *qdockProjectWindow;
    QDockWidget *qdockContextWindow;
    QDockWidget *qdockRelationWindow;
    QDockWidget *qdockClipWindow;
    QDockWidget *qdockActivateSearchResultWindow;
    /*工具栏按钮*/
    QAction *qactionNew;
    QAction *qactionOpen;
    QAction *qactionSave;
    QAction *qactionSaveAs;
    QAction *qactionSaveAll;
    QAction *qactionPrint;
    QAction *qactionCut;
    QAction *qactionCopy;
    QAction *qactionPaste;
    QAction *qactionUndo;
    QAction *qactionRedo;
    QAction *qactionSearch;
    QAction *qactionSearchBackward;
    QAction *qactionSearchForward;
    QAction *qactionSearchFiles;
    QAction *qactionReplace;
    QAction *qactionGotoPrevLink;
    QAction *qactionGotoNextLink;
    QAction *qactionGoBack;
    QAction *qactionGoForward;
    QAction *qactionGotoLine;
    QAction *qactionBookmark;
    QAction *qactionJumpToDefinition;
    QAction *qactionSymbolInfo;
    QAction *qactionBrowseProjectSymbol;
    QAction *qactionLookUpReference;
    QAction *qactionTileHorizontal;
    QAction *qactionTileOneWindow;
    QAction *qactionTileTwoWindow;
    QAction *qactionCascadeWindows;
    QAction *qactionHtmlHelp;
    QAction *qactionProjectWindow;
    QAction *qactionContextWindow;
    QAction *qactionRelationWindow;
    QAction *qactionClipWindow;
    QAction *qactionActivateSearchResultWindow;
    /*File菜单*/
    QAction *qactionNewChip;
    QAction *qactionClose;
    QAction *qactionCloseAll;
    QAction *qactionReloadFile;
    QAction *qactionReloadAll;
    QAction *qactionRename;
    QAction *qactionDeleteFile;
    QAction *qactionLoadWorkspace;
    QAction *qactionSaveWorkspace;
    QAction *qactionPageSetup;
    QAction *qactionExit;
    /*Edit菜单*/
    QAction *qactionUndoAll;
    QAction *qactionRedoAll;
    QAction *qactionDuplicate;
    QAction *qactionCutToClip;
    QAction *qactionCopyToClip;
    QAction *qactionPasteFromClip;
    QAction *qactionInsertFile;
    QAction *qactionRenumber;
    QAction *qactionSmartRename;
    QAction *qactionSelectAll;
    QAction *qactionSelectFunctionOrSymbol;
    QAction *qactionSelectBlock;
    //QAction *qactionSpecialEdit;
    QAction *qactionUppercase;
    QAction *qactionLowercase;
    QAction *qactionToggleCase;
    QAction *qactionSpaceToTab;
    QAction *qactionTabToSpace;
    QAction *qactionInsertASCII;
    QAction *qactionReformParagraph;
    QAction *qactionCalculate;
    QAction *qactionIndentRight;
    QAction *qactionIndentLeft;
    QAction *qactionStartRecording;
    QAction *qactionStopRecording;
    QAction *qactionPlayRecording;
    /*Search菜单*/
    QAction *qactionSearchProject;
    QAction *qactionReplaceFiles;
    QAction *qactionSelectionHistory;
    QAction *qactionJumpToLink;
    QAction *qactionParseSourceLinks;
    QAction *qactionBrowseLocalFileSystem;
    /*Project菜单*/
    QAction *qactionNewProject;
    QAction *qactionOpenProject;
    QAction *qactionCloseProject;
    QAction *qactionRemoveProject;
    QAction *qactionAddAndRemoveProjectFiles;
    QAction *qactionSynchronizeFiles;
    QAction *qactionProjectReport;
    QAction *qactionRebuildProject;
    QAction *qactionProjectSettings;
    /*Options*/
    QAction *qactionPreferences;
    QAction *qactionDocumentOptions;
    QAction *qactionStyleProperties;
    QAction *qactionKeyAssignments;
    QAction *qactionMenuAssignments;
    QAction *qactionCustormCommands;
    QAction *qactionLoadConfiguration;
    QAction *qactionSaveConfiguration;
    /*View*/
    //QAction *qactionToolbars;
    QAction *qactionStatusBar;
    QAction *qactionHorizontalScrollBar;
    QAction *qactionLineNumber;
    QAction *qactionSymbolWindow;
    QAction *qactionShowClipboard;
    QAction *qactionDraftView;
    /*Window*/
    QAction *qactionNewWindow;
    QAction *qactionCloseWindow;
    QAction *qactionTileVertical;
    QAction *qactionLinkWindow;
    QAction *qactionLinkAllWindow;
    QAction *qactionWindowList;
    /*help*/
    QAction *qactionHelp;
    QAction *qactionHelpMode;
    QAction *qactionSDKhelp;
    QAction *qactionCreateKeyList;
    QAction *qactionCreateCommandList;
    QAction *qactionOrderingInformation;
    QAction *qactionSerialNumber;
    QAction *qactionSourceDynamicsOnTheWeb;
    QAction *qactionAbout;
};

#endif // WIDGET_H
